package cn.edu.imnu.controller;

import cn.edu.imnu.common.ResponseData;
import cn.edu.imnu.entry.vo.DoctorListVo;
import cn.edu.imnu.service.DoctorService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("doctor")
public class DocController {
    @Resource
    private DoctorService doctorService;

    @GetMapping("getDoctorList")
    public ResponseData<List<DoctorListVo>> getDoctorList(){
        List<DoctorListVo> doctorList = doctorService.getDoctorList();

        return ResponseData.ok(doctorList);
    }
}
